<template>
  <div class="app_container">
    <el-form ref="form" :model="loginForm" label-width="60px"  class="app_login_form">
  <el-form-item label="用户名:">
    <el-input v-model="loginForm.userName"></el-input>
  </el-form-item>

  <el-form-item label="密码:">
    <el-input type="password" v-model="loginForm.passWord"></el-input>
  </el-form-item>

  <el-form-item>
    <el-button type="primary" v-on:click="onSubmit">登录</el-button>
    <el-button>取消</el-button>
  </el-form-item>
</el-form>
  </div>
</template>
<script>
export default{
  name: 'Login',
  data: function () {
    return {
      loginForm: {
        userName: '',
        passWord: ''
      }
    }
  },
  methods: {
    onSubmit: function () {
      this.$router.replace('/home')
    }
  }
}
</script>
